<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>HTML data</title>
    <script type="text/javascript">
        window.onload = function () {
            var aNodes = document.getElementsByTagName("a");
            for (var i = 0; i < aNodes.length; i++) {
                aNodes[i].onclick = function () {
                    var requset = new XMLHttpRequest();
                    var method = "GET";

                    var url = this.href;
                    requset.open(method, url);

                    requset.send(null);

                    requset.onreadystatechange = function () {
                        if (requset.readyState === 4) {
                            if (requset.status === 200 || requset.status === 304) {
                                document.getElementById("details").innerHTML = requset.responseText;
                            }
                        }
                    };

                    return false;
                }
            }
        };
    </script>
</head>
<body>
<h1>People</h1>
<ul>
    <li>
        <a href="htmlfiles/andy.html">Andy</a>
    </li>
    <li>
        <a href="htmlfiles/richard.html">Richard</a>
    </li>
    <li>
        <a href="htmlfiles/jeremy.html">Jeremy</a>
    </li>
</ul>
<div id="details"></div>
</body>
</html>